import type { HTMLAttributes } from "vue";
import { defineComponent, ref } from "vue";
import Button from "./Button";

/**
 * 基本状态示例
 */
const Counter = defineComponent<HTMLAttributes>({
  setup() {
    const count = ref(0);
    return () => (
      <div>
        <Button onClick={() => count.value--}>-</Button>
        {count.value}
        <Button onClick={() => count.value++}>+</Button>
      </div>
    );
  },
});

export default Counter;
